home *** CD-ROM | disk | FTP | other *** search
- Q31560 Internal Compiler Error: grammar.c, Line 91
- C Compiler
- 5.10
- MS-DOS
-
- Summary:
- When the following program is compiled with the compile option
- /Alhu, it will generate the following error:
-
- fatal error C1001: Internal Compiler Error
- (compiler file '@(#)grammar.c , line 91)
- Contact Microsoft Technical Support
-
- To work around the problem, break up the assignment statements, as
- shown in the modified code below.
- Microsoft is researching this problem and will post new information
- as it becomes available.
-
- More Information:
- The following program demonstrates the problem:
-
- # define SWAPLONG(p) \
- (long) ( ((*(((int *)(p)) ) << 24) & 0xff000000) \
- | ((*(((int *)(p)) + 1) << 16) & 0x00ff0000) \
- | ((*(((int *)(p)) + 2) << 8) & 0x0000ff00) \
- | (*(((int *)(p)) + 3) & 0x000000ff) )
-
- typedef struct extent
- {
- long ex_next;
- long ex_prev;
- long ex_objid;
- } EXTENT;
-
- main()
- {
- register EXTENT *extent, *oextent;
- register int i;
-
- extent->ex_next=SWAPLONG(&oextent->ex_next);
- extent->ex_prev=SWAPLONG(&oextent->ex_prev);
- extent->ex_objid=SWAPLONG(&oextent->ex_objid);
-
- }
-
- The following is one way to modify the above code to work around
- the internal compiler error:
-
- # define SWAPLONG(p) \
- (long) ( ((*(((int *)(p)) ) << 24) & 0xff000000) \
- | ((*(((int *)(p)) + 1) << 16) & 0x00ff0000) \
- | ((*(((int *)(p)) + 2) << 8) & 0x0000ff00) \
- | (*(((int *)(p)) + 3) & 0x000000ff) )
-
- typedef struct extent
- {
- long ex_next;
- long ex_prev;
- long ex_objid;
- } EXTENT;
-
- main()
- {
- register EXTENT *extent, *oextent;
- register int i;
- long l,k;
-
- l=SWAPLONG(&oextent->ex_next);
- extent->ex_next=l;
-
- k=oextent->ex_prev;
- l = SWAPLONG(&k);
- extent->ex_prev = l;
-
- k=oextent->ex_objid;
- l = SWAPLONG(&k);
- extent->ex_objid = l;
-
- }
-
-
-
- Keywords: buglist5.10
- Updated 88/07/21 03:19
-